public class Test5_10 {
    public static void main(String args[]){
        ComputerWeight[]goodsOne=new ComputerWeight[50];
        ComputerWeight[]goodsTwo=new ComputerWeight[22];
        for(int i = 0;i<goodsOne.length;i++){
            if(1%3==0)
                goodsOne[i] = new Television();
            else if(1%3==1)
              goodsOne[i] = new Computer();
            else if(1%3==2)
                goodsOne[i] = new WashMchine();
        }
        for(int i = 0;i<goodsTwo.length;i++){
            if(1%3==0)
                goodsTwo[i] = new Television();
            else if(1%3==1)
                goodsTwo[i] = new Computer();
            else if(1%3==2)
                goodsTwo[i] = new WashMchine();
        }
        Car 大货车 = new Car(goodsOne);
        System.out.println("大货车装载的货物重量" + 大货车.getTotalWeight());
        Car 小货车 = new Car(goodsTwo);
        System.out.println("小货车张装载的货物重量" + 小货车.getTotalWeight());

    }
}


